import { MyRouteObject } from "../store/common";

export default () =>
  new Promise((resolve) => {
    const routes: MyRouteObject[] = [
      {
        path: "/dashboard",
        name: "首页",
        element: "/dashboard",
      },
      {
        path: "/m_one",
        name: "主菜单一",
        children: [
          {
            name: "子菜单一",
            path: "moc_one",
            element: "/m_one/moc_one",
          },
          {
            name: "子菜单二",
            path: "moc_two",
            element: "/m_one/moc_two",
          },
          {
            name: "子菜单三",
            path: "moc_three",
            element: "/m_one/moc_three",
          },
        ],
      },
      {
        path: "/m_two",
        name: "主菜单一",
        children: [
          {
            name: "子菜单一",
            path: "mtc_one",
            element: "/m_two/mtc_one",
          },
          {
            name: "子菜单二",
            path: "mtc_two",
            element: "/m_two/mtc_two",
          },
        ],
      },
    ];

    const timer = setTimeout(() => {
      clearTimeout(timer);
      resolve(routes);
    }, 500);
  });
